Optimal. Leaf size=161 \[ -\frac{\cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}}{3 a^2 c^2 f}+\frac{3 \cot (e+f x) \sqrt{a \sec (e+f x)+a}}{2 a c^2 f}+\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} c^2 f}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{2 \sqrt{2} \sqrt{a} c^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.234524, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3904, 3887, 480, 583, 522, 203} \[ -\frac{\cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}}{3 a^2 c^2 f}+\frac{3 \cot (e+f x) \sqrt{a \sec (e+f x)+a}}{2 a c^2 f}+\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} c^2 f}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{2 \sqrt{2} \sqrt{a} c^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3887
Rule 480
Rule 583
Rule 522
Rule 203
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx &=\frac{\int \cot ^4(e+f x) (a+a \sec (e+f x))^{3/2} \, dx}{a^2 c^2}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{a^2 c^2 f}\\ &=-\frac{\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a^2 c^2 f}-\frac{\operatorname{Subst}\left (\int \frac{-9 a-3 a^2 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{3 a^2 c^2 f}\\ &=\frac{3 \cot (e+f x) \sqrt{a+a \sec (e+f x)}}{2 a c^2 f}-\frac{\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a^2 c^2 f}+\frac{\operatorname{Subst}\left (\int \frac{-21 a^2-9 a^3 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{6 a^2 c^2 f}\\ &=\frac{3 \cot (e+f x) \sqrt{a+a \sec (e+f x)}}{2 a c^2 f}-\frac{\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a^2 c^2 f}+\frac{\operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{2 c^2 f}-\frac{2 \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c^2 f}\\ &=\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} c^2 f}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{2 \sqrt{2} \sqrt{a} c^2 f}+\frac{3 \cot (e+f x) \sqrt{a+a \sec (e+f x)}}{2 a c^2 f}-\frac{\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a^2 c^2 f}\\ \end{align*}
Mathematica [C] time = 23.7911, size = 5586, normalized size = 34.7 \[ \text{Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.303, size = 377, normalized size = 2.3 \begin{align*}{\frac{1}{12\,f{c}^{2}a \left ( \sin \left ( fx+e \right ) \right ) ^{3}}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( 12\, \left ( \cos \left ( fx+e \right ) \right ) ^{2}\sin \left ( fx+e \right ) \sqrt{2}\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) +3\,\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{2}\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) -12\,\sqrt{2}\sin \left ( fx+e \right ){\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}-3\,\sin \left ( fx+e \right ) \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) -22\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}-4\, \left ( \cos \left ( fx+e \right ) \right ) ^{2}+18\,\cos \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a \sec \left (f x + e\right ) + a}{\left (c \sec \left (f x + e\right ) - c\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.32107, size = 1395, normalized size = 8.66 \begin{align*} \left [-\frac{3 \, \sqrt{2} \sqrt{-a}{\left (\cos \left (f x + e\right ) - 1\right )} \log \left (-\frac{2 \, \sqrt{2} \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, a \cos \left (f x + e\right )^{2} - 2 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 12 \, \sqrt{-a}{\left (\cos \left (f x + e\right ) - 1\right )} \log \left (-\frac{8 \, a \cos \left (f x + e\right )^{3} + 4 \,{\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) - 4 \,{\left (11 \, \cos \left (f x + e\right )^{2} - 9 \, \cos \left (f x + e\right )\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{24 \,{\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}, \frac{3 \, \sqrt{2} \sqrt{a}{\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 12 \, \sqrt{a}{\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac{2 \, \sqrt{a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \,{\left (11 \, \cos \left (f x + e\right )^{2} - 9 \, \cos \left (f x + e\right )\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{12 \,{\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{1}{\sqrt{a \sec{\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )} - 2 \sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )} + \sqrt{a \sec{\left (e + f x \right )} + a}}\, dx}{c^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]